import { createSlice } from '@reduxjs/toolkit'

export const userSlice = createSlice({
  name: 'user',
  initialState: {
    info:null
  },
  reducers: {
    setinfo(state,actions){
        state.info=actions.payload
    }
  }
})
// 每个 case reducer 函数会生成对应的 Action creators
export const { setinfo } = userSlice.actions

export default userSlice.reducer